<?xml version="1.0" encoding="utf-8"?>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
  
 	
		<%@include file="loading.jsp" %>	
		
  	<script type="text/javascript">
		     function okButton(){
      	divSumir();
       $('#excluirlink').click();
       
     };
    
     </script>
  <div id="divsumir" name="divsumir">
  <s:if test="%{link.id != null}">	

   <sj:dialog id="dialogexcluirlink" buttons="{'SIM':function() {okButton();},'Não':function() {cancelButton();} }" autoOpen="false" modal="true" title="Excluir Registro" effect="explode" hideEffect="explode">
     Excluir Link?
    </sj:dialog>
    <sj:a onclick="divSumir();" href="manterlink!deleteLink?idCentro=%{idCentro}&idEstande=%{idEstande}&idLink=%{idLink}" targets="main"  id="excluirlink"></sj:a>
  </s:if>
    
    
  <s:form action="manterlink!saveLink" theme="simple"  method="post" id="formlink">
  
			<sj:a href="%{manterlink!deleteLink?idEstande=%{idEstande}&idCentro=%{idCentro}&idLink=%{idLink}" targets="main" indicator="indicator" id="exlcuir"></sj:a>
  

  	 <div id="nav">
      <!-- skiplink anchor: navigation -->
      <a id="navigation" name="navigation"></a>

      <div class="hlist">
        <ul>
        <li>
          	<sj:a onclick="divSumir();" id="retornar" href="manterestande!editEstande?idCentro=%{idCentro}&idEstande=%{idEstande}"  targets="main">Retornar
    		</sj:a> 
    	</li>
         
          <li>
          	<sj:a onclick="divSumir();" id="ajaxformlink" formIds="formlink"  targets="main"  >Salvar
    		</sj:a>
          	
	      </li>
	      <s:if test="%{link.id != null}">	
	      	<li>
          		<sj:a openDialog="dialogexcluirlink">Excluir</sj:a>	
          	</li>
	   	</s:if>
          
        </ul>
      </div>
    </div>	
  	<s:actionerror cssClass="ui-state-error ui-corner-all" cssStyle="padding: 0pt 0.7em;"/>  	 
  	<s:actionmessage cssClass="ui-state-highlight ui-corner-all" cssStyle="padding: 0pt 0.7em; margin-top: 20px;"/>
		
	 <fieldset class="ui-widget ui-widget-content ui-corner-all" style="margin: 10px">
  	 		<legend class="ui-state-default ui-corner-all">&nbsp;&nbsp;&nbsp;Link&nbsp;&nbsp;&nbsp;</legend>
  	 		<br>
		<table width="100%" >
		<tr valign="top">	
			
    		<td>	
				<sj:textfield name="link.url" label="Link" cssStyle="width: 200px"/>					
			</td>			
			
			<td>
				<sj:textarea name="link.descricao" label="Descricao" cols="100" cssStyle="width: 250px"/>
			</td>		
		
		
		</tr>
			
	 </table>
			
			
	</fieldset>
	
	<s:hidden name="idCentro"/>
			<s:hidden name="idEstande"/>
					<s:if test="%{link.id != null}">	
				
					<s:hidden name="link.id"/>
					<s:hidden name="idLink" />
					<s:hidden name="link.dtCriacao"/>
				</s:if>
	
 </s:form> 
 
 </div>
 